<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>Document</title>
  </head>
  <body>
    <script>
        // alter() 用于显示带有一段消息和一个确认按钮的警告框。
        // console.log() 用于将信息发送到控制台。
        // document.write() 用于向文档写内容。
      var i = 5;
      document.write("整数：" + typeof i + "<br/>");
      var f = 3.14;
      document.write("浮点数：" + typeof(f) + "<br/>");
      var str = "abc";
      document.write("字符串：" + typeof str + "<br/>");
      var c = 'a';
      document.write("字符：" + typeof c + "<br/>");
      var b = true;
      document.write("布尔类型：" + typeof b + "<br/>");
      var u;
      document.write("未定义的类型：" + typeof u + "<br/>");
      var n = null;
      document.write("null：" + typeof null + "<br/>");
    </script>
  </body>
</html>
